package at.ac.tuwien.infosys.aic11.dto;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;


@XmlRootElement(name = "address")
@XmlAccessorType(XmlAccessType.NONE)
public class Address {
	
	
	@XmlAttribute(name="id", required=true)
	private String id;
	@XmlElement(name="street", required=true)
	private String street;
	@XmlElement(name="city", required=true)
	private String city;
	@XmlElement(name="house", required=true)
	private String house;
	@XmlElement(name="door", required=true)
	private String door;
	//disbursement service expects element name in this style
	@XmlElement(name="postalCode", required=true)
	private String zipCode;
	@XmlElement(name="countryCode", required=true)
	private String countryCode="AT";
	

	public Address(){}
	
	public Address(String id, String street, String city, String house,
				   String door, String zipCode){
		this.id=id;
		this.street=street;
		this.city=city;
		this.house=house;
		this.door=door;
		this.zipCode=zipCode;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getHouse() {
		return house;
	}

	public void setHouse(String house) {
		this.house = house;
	}

	public String getDoor() {
		return door;
	}

	public void setDoor(String door) {
		this.door = door;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}
	
	public String getCountryCode() {
		return countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}
	
	public String toString(){
		return "id: "+id+" street: "+street+" city: "+city+" house: "+house+
				" door: "+door+" zipCode: "+zipCode+" country code: "+countryCode;
	}

}
